#!/usr/bin/env python
#    choles_cc2_excdiis
#    -----------------
#    Molecule:         furan (C4OH4)
#    Wave Functions:   Turbomole-SVP
#    Test Purpose:     Cholesky CC2 excitation energies

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string = 'Total SCF',
      rel_tolerance = 1.0e-8)
f.add(string = 'Total CC2',
      rel_tolerance = 1.0e-8)

f.add(string = 'Number of t1 amplitudes')
f.add(string = 'Number of t2 amplitudes')

f.add(from_string = 'CCS        Excitation energies',
      num_lines = 11,
      rel_tolerance = 1.0e-6)

f.add(from_string = 'CC2        Excitation energies',
      num_lines = 11,
      rel_tolerance = 1.0e-6)

test.run(['choles_cc2_excdiis.dal'], ['furan_Turbomole-SVP.mol'], f={'out': f},
         accepted_errors=['not implemented for parallel calculations'])

sys.exit(test.return_code)
